<%@ page import="Dao.booksDAO" %>
<%@ page import="JavaBean.Book" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ page isELIgnored="false"%>
<html>
<head>
	<title>修改用户信息</title>
	<link rel="stylesheet" href="../assets/css/layui.css">
</head>
<body>

<%
	String ID = request.getParameter("id");
	booksDAO dao= new booksDAO();
	Book books = dao.getAllBooksByID(ID);
	pageContext.setAttribute("ID",ID);
	pageContext.setAttribute("books",books);
%>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
	<legend>修改书本信息</legend>
</fieldset>

<form class="layui-form" action="doEditBook.jsp" method="post">
	<input name="id" value="${ID}" style="display: none">
	<div class="layui-form-item">
		<label class="layui-form-label">书名</label>
		<div class="layui-input-inline">
			<input type="text" name="bookname" value="${books.getName()}" lay-verify="pass" placeholder="请输入用户名" autocomplete="off" class="layui-input">
		</div>
		<div class="layui-form-mid layui-word-aux">起一个容易记住的名字吧</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">更改作者</label>
		<div class="layui-input-inline">
			<input type="text" name="author" id="" value="${books.getAuthor()}" lay-verify="pass" placeholder="请输入密码" autocomplete="off" class="layui-input">
		</div>
		<div class="layui-form-mid layui-word-aux">请填写6到12位密码</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">出版社</label>
		<div class="layui-input-inline">
			<input type="text"  value="${books.getPublish()}" name="publish" lay-verify="pass" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
		</div>
		<div class="layui-form-mid layui-word-aux">出版社</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">Isbn图书号</label>
		<div class="layui-input-inline">
			<input type="text"  value="${books.getIsbn()}" name="isbn" lay-verify="pass" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">价格</label>
		<div class="layui-input-inline">
			<input type="text"  value="${books.getPrice()}" name="price" lay-verify="pass" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item">
		<label class="layui-form-label">出版日期</label>
		<div class="layui-input-inline">
			<input type="text"  value="${books.getPublishdate()}" name="publishdate" lay-verify="pass" placeholder="请输入出版日期" autocomplete="off" class="layui-input">
		</div>
	</div>

	<div class="layui-form-item layui-form-text">
		<label class="layui-form-label">书本简介</label>
		<div class="layui-input-block">
			<textarea placeholder="请输入内容" class="layui-textarea" name="bookresume" >${books.getBookresume()}</textarea>
		</div>
	</div>

	<div class="layui-form-item layui-form-text">
		<label class="layui-form-label">书本内容</label>
		<div class="layui-input-block">
			<textarea placeholder="请输入内容" class="layui-textarea" name="bookContent" >${books.bookContent}</textarea>
		</div>
	</div>


	<div class="layui-form-item">
		<div class="layui-input-block">
			<input type="submit" class="layui-btn" name="save" value="提交" />
			<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			<button type="reset" class="layui-btn layui-btn-primary"><a href="booksManager.jsp">返回</a></button>
		</div>
	</div>
</form>
<script src="../assets/layui.all.js"></script>

</body>
</html>
